<?php
/**
 * @author Laurent SITTLER <lolo.sittler@gmail.com>
 * @author Alexandre GOMEZ <gomez.alexandre02@gmail.com>
 * @version 0.1
 */

/**
 *  Login page
 */
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!--[if lt IE 9]>
            <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <title>sgbdMyAdmin - Login</title>

        <link rel="icon" href="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/images/favicon.ico" type="image/x-icon" />
        <link rel="shortcut icon" href="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/images/favicon.ico" type="image/x-icon" />

        <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/css/default.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/css/jquery-ui-1.9.2.custom.css" />
        <script type="text/javascript" src="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/js/jquery-1.8.3.js"></script>
        <script type="text/javascript" src="<?php $GLOBALS['conf']['interface']['url']; ?>Public/js/jquery-ui-1.9.2.custom.js"></script>
    </head>
    <body>
        <section id="login">
            <img src="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/images/SGBDMyAdmin.png" title="" id="logo"/>
            <div id="title"><span>SGBD</span>MyAdmin</div>
            <?php
            if (Session::Get(Constants::$SESSION_error) != NULL) {
                echo '<div class="ui-widget" style="width: 50%; margin: auto; text-align: left;">';
                echo '<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">';
                echo '<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>';
                echo '<strong>Erreur : </strong><br />' . Session::Get(Constants::$SESSION_error) . '</p>';
                echo '</div>';
                echo '</div> ';
            }
            ?>
            <form action="<?php echo $GLOBALS['conf']['interface']['url']; ?>login/run" method="post">
                <fieldset>
                    <div id="legend">&nbsp;Authentification&nbsp;</div>
                    <p class="field">
                    <input type="text" name="login" autocomplete="off" id="loginvalue" autofocus="autofocus" placeholder="Utilisateur" required="required" />
                    <i class="icon-user"><img src="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/images/icon-user.png" title=""/></i>
                    </p>
                    <p class="field">
                    <input type="password" name="passwd" placeholder="Mot de passe" required="required" />
                    <i class="icon-password"><img src="<?php echo $GLOBALS['conf']['interface']['url']; ?>Public/images/icon-key.png" title=""/></i>
                    </p>
                    <input type="submit" value="Login" />
                </fieldset>
            </form>
        </section>
        <footer>
            coryright 2013 &copy; ITII/CNAM Alsace | Laurent SITTLER - Alexandre GOMEZ :)
        </footer>
    </body>
</html>
